package com.workManager.exception;


import com.workManager.config.RespCode;

/**
 * 
* @ClassName: BusinessException 
* @Description: 业务服务异常 
* @author xucan
* @date 2016年11月4日 上午11:54:45 
*
 */
@SuppressWarnings("serial")
public class BusinessException extends BaseException {
	public BusinessException() {
	}

	public BusinessException(Throwable ex) {
		super(ex);
	}
	
	public BusinessException(String message) {
		this(RespCode.defineRespCode(message));
	}
	
	public BusinessException(RespCode respCode, String message) {
		super(RespCode.defineRespCode(respCode, message));
		respCode.setMsg(message);
	}

	public BusinessException(String message, Throwable ex) {
		super(message, ex);
	}
	
	public BusinessException(RespCode respCode, Exception e) {
		super(respCode, e);
	}
	
	public BusinessException(RespCode respCode) {
		super(respCode);
	}
	
	protected RespCode getRespCode() {
		return RespCode.INTERNAL_SERVER_ERROR;
	}
}